import { createRouter, createWebHistory } from 'vue-router';

// 引入页面组件
import MRP from '@/views/mrp.vue';
import Debt from '@/views/debt.vue';
import Home from '@/views/Home.vue';

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      redirect: '/mrp',
    },
    {
      path: '/home',
      name: 'home',
      component: Home,
      children: [
        {
          path: '/mrp',
          name: 'MRP',
          component: MRP,
        },
        {
          path: '/debt',
          name: 'Debt',
          component: Debt,
        },
      ],
    },
  ],
});

export default router;